package com.liang.text7;

public class Text7Lambda {
    public static void main(String[] args) {

        method(new ShowHandler() {
            @Override
            public void show(int a) {
                System.out.println("匿名内部类");
            }
        },new ShowHandler() {
            @Override
            public void show(int a) {
                System.out.println("匿名内部类");
            }
        });

        method((int b)-> {
            System.out.println("lambda......"+b);
        },(int a)->{
            System.out.println("nihao......"+a);
        });


    }

    public static void method(ShowHandler showHandler,ShowHandler showHandler2) {
        showHandler.show(1);
        showHandler2.show(2);
    }
}
